package com.aabte.design.pattern.structural.composite;


import lombok.AllArgsConstructor;

@AllArgsConstructor
public class Course extends CatalogComponent {

    private String name;
    private double price;

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public double getPrice() {
        return this.price;
    }

    @Override
    public void print() {
        System.out.println("Course Name: " + this.name + " Price: " + this.price);
    }
}
